home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 52
/
Volume 52 - JOGO DISK .iso
/
Games
/
shopdrop.swf
/
scripts
/
__Packages
/
Fader.as
< prev
next >
Wrap
Text File
|
2007-09-27
|
872b
|
36 lines
class Fader extends MovieClip
{
var fadeUpdates = 4;
var alphaGoal = 25;
var cFade = 0;
function Fader()
{
super();
this._visible = false;
}
function fade()
{
_global.mcRoot.mcStuffHolder.mcPlayer.stopWalk();
this._visible = true;
this._alpha = 100;
this.cFade = 0;
this.onEnterFrame = this.fadeUpdate;
}
function fadeUpdate()
{
this._alpha = 100 - (100 - this.alphaGoal) * (this.cFade / this.fadeUpdates);
this.cFade = this.cFade + 1;
if(this.cFade >= this.fadeUpdates)
{
this.onEnterFrame = null;
this._visible = false;
_global.mcRoot.mcCountdown._visible = true;
_global.mcRoot.mcCountdown.play();
}
else
{
_global.mcRoot.mcStuffHolder.mcPlayer.stopWalk();
}
}
}